package com.example.saifly.inPageRecord.RecordModel;

import java.util.Date;

public class TotalScore extends TotalScoreKey {
    private Float totalScore;

    private Float environmentScore;

    private Float dailyplanScore;

    private Float bodydateScore;

    private Float ventilatorScore;

    private Float dailyQuestionScore;

    public TotalScore(Date date, String patientPhone, Float totalScore, Float environmentScore, Float dailyplanScore, Float bodydateScore, Float ventilatorScore, Float dailyQuestionScore) {
        super(date, patientPhone);
        this.totalScore = totalScore;
        this.environmentScore = environmentScore;
        this.dailyplanScore = dailyplanScore;
        this.bodydateScore = bodydateScore;
        this.ventilatorScore = ventilatorScore;
        this.dailyQuestionScore = dailyQuestionScore;
    }

    public void calculateTotalScore(){
        totalScore=environmentScore*0.2f
                +dailyplanScore*0.2f
                +bodydateScore*0.2f
                +ventilatorScore*0.2f
                +dailyQuestionScore*0.2f;
    }

    public Float getTotalScore() {
        return totalScore;
    }

    public void setTotalScore(Float totalScore) {
        this.totalScore = totalScore;
    }

    public TotalScore(Date date, String patientPhone) {
        super(date, patientPhone);
    }

    public TotalScore() {
    }

    public Float getEnvironmentScore() {
        return environmentScore;
    }

    public void setEnvironmentScore(Float environmentScore) {
        this.environmentScore = environmentScore;
    }

    public Float getDailyplanScore() {
        return dailyplanScore;
    }

    public void setDailyplanScore(Float dailyplanScore) {
        this.dailyplanScore = dailyplanScore;
    }

    public Float getBodydateScore() {
        return bodydateScore;
    }

    public void setBodydateScore(Float bodydateScore) {
        this.bodydateScore = bodydateScore;
    }

    public Float getVentilatorScore() {
        return ventilatorScore;
    }

    public void setVentilatorScore(Float ventilatorScore) {
        this.ventilatorScore = ventilatorScore;
    }

    public Float getDailyQuestionScore() {
        return dailyQuestionScore;
    }

    public void setDailyQuestionScore(Float dailyQuestionScore) {
        this.dailyQuestionScore = dailyQuestionScore;
    }

    @Override
    public String toString() {
        return "TotalScoreKey{" +
                "date=" + this.getDate() +
                ", patientPhone='" + this.getPatientPhone() + '\'' +
                '}'+"TotalScore{" +
                "totalScore=" + totalScore +
                ", environmentScore=" + environmentScore +
                ", dailyplanScore=" + dailyplanScore +
                ", bodydateScore=" + bodydateScore +
                ", ventilatorScore=" + ventilatorScore +
                ", dailyQuestionScore=" + dailyQuestionScore +
                '}';
    }
}